package com.oracle.servlet.senior;

import java.io.IOException;
//import java.sql.Connection;
//import java.sql.PreparedStatement;
//import java.sql.ResultSet;
//import java.sql.SQLException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.oracle.jdbc.ConnJDBC;

import com.oracle.dao.senior.ScenicDao;
import com.oracle.entity.senior.Scenic;


@WebServlet("/index_menu")
public class LeftServlet extends HttpServlet{
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		
//		String proc=request.getParameter("proc");
//		Connection conn=ConnJDBC.getConnection();
//		String sql="select name from senior where proc=?";
//		try {
//			PreparedStatement ps=conn.prepareStatement(sql);
//			ps.setString(5, proc);
//			ResultSet rs=ps.executeQuery();
//			if(rs.next()){
//				rs.getString(2);
//			}
//		} catch (SQLException e) {
//			
//		}
		
		ArrayList<Scenic> list=new ScenicDao().findArrayList();
		request.setAttribute("list",list );
		request.getRequestDispatcher("page/index_menu.jsp").forward(request, response);
		System.out.println("h");
	}

}
